﻿package  {
	import flash.display.MovieClip;
	
	
	//the main document class
	//remember that this is attached to the timeline via the properties panel
	//all game initialisation and creation of objects should happen in the Game constructor
	public class Game extends MovieClip{
		
		//this object created as a class member rather than as a local variable
		//so it can be accessed by other functions of the class
		public var item:DraggableItem;


		public function Game() {
			// constructor code
			trace("constructor for game class")
			//make an item and add it to the screen
			item=new DraggableItem();
			item.x=400;
			item.y=200;
			addChild(item);
			
			//note how the TextPanel singleton is accessed in a different way to normal
			//if this is confusing you then you can just do it the normal way instead!
			addChild(TextPanel.getInstance());
			

		}

	}
	
}
